import React, { useState } from 'react'
import { Child } from '@/components/child'


interface ParentProps {
    children: Readonly<React.ReactNode>
}

export function Parent (prop: ParentProps) {

    const [counter, setCounter] = useState(369)

    console.log('parent',1)

    return (
        <div className={'p-20 bg-rose-400'}>
            <p>{counter}</p>
            <button className={'px-8 py-3 bg-purple-400 text-white'}
                    onClick={() => setCounter(counter + 1)}>
                increment
            </button>
            { prop.children }
        </div>
    )
}
